<?php
$vars['helper']->insertMessage();
$vars['helper']->setContainerClass('');

$forum = $vars['forum'];
$acceptedTopics = $vars['acceptedTopics'];
?>

<div id="link-back">
<a class="button" 
	href="<?php echo $vars['helper']->createHref('Home')?>">
		<?php echo __('Home'); ?>
</a>
<a class="button" 
	href="<?php $vars['helper']->insertHref( 'Forum', 'displaySingleForum', array('forumId' => $forum->getId() )); ?>">
		<?php echo __('Discussions'); ?>
</a>
&nbsp;
<h4> <?php echo __('Choose topic type'); ?></h4>
</div>

<h3>Choose the type of topic</h3>
<div class="rounded-box padded margined">
<h4><?php echo $forum->getName(); ?></h4>
<?php foreach( $acceptedTopics as $typeManager ) :
	$topicName = $typeManager->getSimpleName();
	?>
	<a href="<?php
		$vars['helper']->insertHrefWithNonce('displayForm', 'Topic', 'displayForm', array( 'typeId' => $typeManager->getTypeId(), 'forumId' => $forum->getId() ) ); ?>"
		class="button"
		title="<?php echo $topicName; ?>"><?php echo $topicName; ?></a>
	<?php endforeach ?>
</div>
<div id="links"><a class="button" href="<?php
$vars['helper']->insertHref( 'Topic', 'chooseType' );
?>"><?php echo __('Other types of topics ?'); ?></a></div>